package com.yan.design.two.behavior.s6;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 6. 中介者模式
 *      用户类
 * @author shengren.yan
 * @create 2022-08-10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class User {

    private String name;
    private String tel;

    // 查询地产
    public User find(String address,Mediator mediator){
        User user = mediator.find(address);
        return user;
    }

}
